package com.ruoyi.system.service.aid.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.aid.AidCategoryMapper;
import com.ruoyi.system.domain.aid.AidCategory;
import com.ruoyi.system.service.aid.IAidCategoryService;

/**
 * 物资类别Service业务层处理
 */
@Service
public class AidCategoryServiceImpl implements IAidCategoryService {
    @Autowired
    private AidCategoryMapper aidCategoryMapper;

    /**
     * 查询物资类别
     * 
     * @param categoryId 物资类别主键
     * @return 物资类别
     */
    @Override
    public AidCategory selectAidCategoryById(Long categoryId) {
        return aidCategoryMapper.selectAidCategoryById(categoryId);
    }

    /**
     * 查询物资类别列表
     * 
     * @param aidCategory 物资类别
     * @return 物资类别
     */
    @Override
    public List<AidCategory> selectAidCategoryList(AidCategory aidCategory) {
        return aidCategoryMapper.selectAidCategoryList(aidCategory);
    }

    /**
     * 新增物资类别
     * 
     * @param aidCategory 物资类别
     * @return 结果
     */
    @Override
    public int insertAidCategory(AidCategory aidCategory) {
        return aidCategoryMapper.insertAidCategory(aidCategory);
    }

    /**
     * 修改物资类别
     * 
     * @param aidCategory 物资类别
     * @return 结果
     */
    @Override
    public int updateAidCategory(AidCategory aidCategory) {
        return aidCategoryMapper.updateAidCategory(aidCategory);
    }

    /**
     * 批量删除物资类别
     * 
     * @param categoryIds 需要删除的物资类别主键
     * @return 结果
     */
    @Override
    public int deleteAidCategoryByIds(Long[] categoryIds) {
        return aidCategoryMapper.deleteAidCategoryByIds(categoryIds);
    }

    /**
     * 删除物资类别信息
     * 
     * @param categoryId 物资类别主键
     * @return 结果
     */
    @Override
    public int deleteAidCategoryById(Long categoryId) {
        return aidCategoryMapper.deleteAidCategoryById(categoryId);
    }

    /**
     * 查询所有正常状态的物资类别
     * 
     * @return 物资类别集合
     */
    @Override
    public List<AidCategory> selectAidCategoryAll() {
        return aidCategoryMapper.selectAidCategoryAll();
    }

    /**
     * 根据父ID查询子类别
     * 
     * @param parentId 父类别ID
     * @return 物资类别集合
     */
    @Override
    public List<AidCategory> selectAidCategoryByParentId(Long parentId) {
        return aidCategoryMapper.selectAidCategoryByParentId(parentId);
    }
} 